import 'dart:isolate';
main(){
  print("start");
  Isolate.spawn(calculate,1000);
  print("end");
}
void calculate(int count){
  var total = 0;
  for (var i = 0;i < count;i++){
    total += i;
  }
  print(total);
}